//
//  JMHomeWarmView.m
//  NewiOSProject
//
//  Created by JMMac on 25.12.23.
//  Copyright © 2023 范智渊. All rights reserved.
//

#import "JMHomeWarmView.h"
#import "JMBankAccountController.h"
@implementation JMHomeWarmView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = Hex_Str_COLOR(@"#F2F0FF");
        
        
        
        UIView *topV = [[UIView alloc]initWithFrame:(CGRectMake(0, 0, frame.size.width, 40))];
        topV.backgroundColor = Hex_Str_COLOR(@"#E9E8FF");
        [self addSubview:topV];
        
        UIImageView *warnImgV = [[UIImageView alloc]initWithFrame:(CGRectMake(12, 8, 24, 24))];
        warnImgV.image = ImageNamed(@"home_warm");
        [self addSubview:warnImgV];
        
        //解冻配额
        UILabel *titleLab = [JMControl createLabelWithFrame:(CGRectMake(warnImgV.right+4, 0, kAppW(), 40)) Font:fontWithWeight(17, UIFontWeightRegular) Text:@"Descongelar la cuota" color:mainSchemeColor()];;
        [self addSubview:titleLab];
        
        UILabel *subTitle = [JMControl createLabelWithFrame:(CGRectMake(12, 48, frame.size.width-24, 80)) Font:Font(15) Text:@"Depósito fallido" color:Hex_Str_COLOR(@"#222222") textAlignment:0 numberOfLine:0];
        [self addSubview:subTitle];
        //验证您的银行账户数据
        UILabel *contentLab = [JMControl createLabelWithFrame:(CGRectMake(12, subTitle.bottom+13, frame.size.width-24, 80)) Font:Font(14) Text:@"Verifique sus datos de cuenta bancaria" color:Hex_Str_COLOR(@"#999999") textAlignment:0 numberOfLine:0];
        [self addSubview:contentLab];
        //去支付
        UIButton *modificarBtn = [JMControl createButtonWithFrame:(CGRectMake(frame.size.width-132, 48, 120, 32)) Target:self Action:@selector(modificarBtnClick:) Title:@"Ir a desembolsar" titlColor:Hex_Str_COLOR(@"#ffffff") font:Font(12) tag:0 backgroundColor:GradientColorWithColor(CGSizeMake(120, 32), FXGradientChangeDirectionHorizontal, mainStartColor(), mainEndColor())];
        [self addSubview:modificarBtn];
        modificarBtn.cornerRadius = 16;
        
    }
    return self;
}
-(void)modificarBtnClick{
    JMBankAccountController *vc = JMBankAccountController.new;
    [self.viewController.navigationController pushViewController:vc animated:YES];
}
@end
